package spring.spring_blog.pojo.model;

import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;

import java.util.Date;

@Data
public class blogInfo {
    Integer userId;
    String title;
    String content;

    @TableField(insertStrategy = FieldStrategy.NOT_EMPTY) // 仅当字段非空时插入
    @TableId(type = IdType.AUTO)//自增
    Integer id;//blogId


    @TableField(insertStrategy = FieldStrategy.NOT_EMPTY) // 仅当字段非空时插入
    Integer deleteFlag;

    @TableField(insertStrategy = FieldStrategy.NOT_EMPTY) // 仅当字段非空时插入
    Date createTime;

    @TableField(insertStrategy = FieldStrategy.NOT_EMPTY) // 仅当字段非空时插入
    Date updateTime;
}
